package config

type MysqlInfo struct {
	Host     string `mapstructure:"host" json:"host"`
	Port     int    `mapstructure:"port" json:"port"`
	User     string `mapstructure:"user" json:"user"`
	Password string `mapstructure:"password" json:"password"`
	Name     string `mapstructure:"db" json:"db"`
}

type ConsulInfo struct {
	Host string   `mapstructure:"host" json:"host"`
	Port int      `mapstructure:"port" json:"port"`
	Tags []string `mapstructure:"tags" json:"tags"`
}

type RedisInfo struct {
	Host string `mapstructure:"host" json:"host"`
	Port int    `mapstructure:"port" json:"port"`
}

type ServerConfig struct {
	Name             string           `mapstructure:"name" json:"name"`
	MysqlInfo        MysqlInfo        `mapstructure:"mysql" json:"mysql"`
	ConsulInfo       ConsulInfo       `mapstructure:"consul" json:"consul"`
	Host             string           `mapstructure:"host" json:"host"`
	RedisInfo        RedisInfo        `mapstructure:"redis" json:"redis"`
	GoodsSrvInfo     GoodsSrvInfo     `mapstructure:"goods_srv" json:"goods_srv"`
	InventorySrvInfo InventorySrvInfo `mapstructure:"inventory_srv" json:"inventory_srv"`
}

type NacosInfo struct {
	Host        string `mapstructure:"host"`
	Port        uint64 `mapstructure:"port"`
	NamespaceId string `mapstructure:"namespace_id"`
	DataId      string `mapstructure:"data_id"`
	Group       string `mapstructure:"group"`
}

type GoodsSrvInfo struct {
	Name string `mapstructure:"name"`
}

type InventorySrvInfo struct {
	Name string `mapstructure:"name"`
}
